

class TuneTest : TestBase
{
  Void test0() {
    m := Music {
      verif("C",c)
      t := Tune(c)
      verif("(C)",t)
    }
  }

  Void test1()
  {
    m := Music {
      t := c+d+e+f+g+a+b+c(1)
      echo(t)
      verifyEq(t.size,8)
      verifyEqFloat(t.length,t.size.toFloat*t[0].length)
    }
  }

  Void test2() {
    m := Music {
      t := c + (d+e+f)/3*2 + g
      echo(t)
      verifyEqFloat(t.length,4f)
    }
  }

  Void test3() {
    m := Music {
      t := (c + e + g + c%e%g + g + e + c)/2
      echo(t)
    }
  }
}